<div class="fm-content">
  <!-- 最上面标题栏 -->
  <div class="title">
    <i nz-icon [type]="'desktop'"></i>
    &nbsp;&nbsp;通知公告
  </div>
  <!-- 内容 -->
  <div class="clwork">

    <!-- 查询框 -->
    <div class="top">
      <input nz-input placeholder="标题" class="fm-input first-input" [(ngModel)]="fs.queryObject['bt:like']" />
      <input nz-input placeholder="发起人" class="fm-input" [(ngModel)]="fs.queryObject['fqrmc:like']" />
      <nz-button-group>
        <button nz-button nzType="primary" (click)="fs.loadData(true)">查询</button>
        <button nz-button (click)="fs.resetQueryObject();fs.loadData(true);fs.statistics();">重置</button>
      </nz-button-group>
      <div class="tool-right">
        <nz-button-group>
          <button nz-button [nzType]="'primary'" (click)="editRow(null)">发起通知</button>
        </nz-button-group>
      </div>
    </div>

    <!--左侧栏合同列表信息-->
    <div class="left top-left">
      <ul nz-menu style="background-color: #fbfbfb;">
        <ng-container *ngFor="let data of fs.statisdatas">
          <ng-container *ngIf="data.name!='未读'">
            <li *ngIf="fs.statisname==data.name" (click)="fs.selectStatistics(data);" nz-menu-item nzSelected>
              {{data.name}}
              <span class="important-font" *ngIf="data.name!='收到通知' || tip.count<=0">({{data.count}})</span>
              <span class="important-font"
                *ngIf="data.name=='收到通知' && tip.count>0">(总{{data.count}}条，未读{{tip.count}}条)</span>
            </li>
            <li *ngIf="fs.statisname!=data.name" (click)="fs.selectStatistics(data);" nz-menu-item>
              {{data.name}}
              <span class="important-font" *ngIf="data.name!='收到通知' || tip.count<=0">({{data.count}})</span>
              <span class="important-font"
                *ngIf="data.name=='收到通知' && tip.count>0">(总{{data.count}}条，未读{{tip.count}}条)</span>
            </li>
          </ng-container>
        </ng-container>
      </ul>
    </div>

    <!-- 右则样表单主体 -->
    <div class="right top-right">
      <div class="table">
        <nz-table nzSize="middle" nzShowSizeChanger [nzPageSizeOptions]='[ 10, 15, 20, 30, 40, 50 ]'
          [nzFrontPagination]="false" [nzData]="fs.datas" [nzLoading]="fs.isLoading || fs.isDeleing"
          [nzTotal]="fs.rowsCount" [(nzPageIndex)]="fs.pageIndex" [(nzPageSize)]="fs.pageSize"
          (nzPageIndexChange)="fs.loadData()" (nzPageSizeChange)="fs.loadData( true)">
          <thead (nzSortChange)="fs.sort( $event)" nzSingleSort>
            <tr>
              <th nzShowCheckbox [(nzChecked)]="fs.allChecked" [nzIndeterminate]="fs.indeterminate"
                (nzCheckedChange)="fs.checkAll( $event)">
              </th>
              <th><span>标题</span></th>
              <th><span>发送时间</span></th>
              <th><span>需要回执</span></th>
              <th *ngIf="fs.statisname=='收到通知'"><span>回执状态</span></th>
              <th><span>操作</span></th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let data of fs.datas">
              <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="fs.refreshCheckStatus()">
              </td>
              <td>
                <span *ngIf="tip.where && tip.where.indexOf(data.id)!=-1 && fs.statisname=='收到通知'"
                  class="important-font">
                  (未读)
                </span>
                <span (click)="editRow(data)" class="form-edit">{{data.bt}}</span>
              </td>
              <td>
                {{data.cjsj | date:'yyyy-MM-dd HH:mm:ss' }}
              </td>
              <td>
                {{data.sfhz | boolReform}}
              </td>
              <td *ngIf="fs.statisname=='收到通知'">
                {{data.hzzt}}
              </td>
              <td>
                <a *ngIf="fs.statisname!='收到通知'" nz-popconfirm nzTitle="确认删除选择项?" (nzOnConfirm)="fs.delEntity(data)"
                  nzPlacement="bottomRight" class="delete-button">删除</a>
              </td>
            </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>
</div>
